package org.jeecg.modules.demo.com.kunpeng.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.com.kunpeng.entity.CustomerInformation;
import org.jeecg.modules.demo.com.kunpeng.vo.CustomerInformationVO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CustomerInformationMapper extends BaseMapper<CustomerInformation> {

    /**
     * 插入一条客户信息
     * @param customerInformation
     * @return
     */
    /*int insert(CustomerInformation customerInformation);*/

    /**
     * 根据id删除客户信息
     * @param id
     */
    int deleteById(String id);

    /**
     * 批量删除客户信息
     * @param ids
     * @return
     */
    int deleteBatch(String[] ids);

    /**
     * 根据id修改用户信息
     * @param customerInformation
     */
    int updateById(CustomerInformation customerInformation);


    /**
     * 根据id查询客户详情
     * @param id
     * @return
     */
    CustomerInformationVO selectById(String id);

    /**
     * 查询客户列表
     * @param page
     * @return
     */
    List<CustomerInformationVO> list(Page<CustomerInformationVO> page, @Param("customerGrade")String customerGrade,@Param("customerSource")String customerSource,
                                     @Param("customerIntent")String customerIntent,@Param("state")String state,@Param("keyWords")String keyWords);

    /**
     * 获取客户名称列表
     */
    List<String> listCustomerName();

    /**
     * 废弃客户列表
     */
    List<CustomerInformationVO> discardCustomerList(Page<CustomerInformationVO> page,@Param("customerName")String customerName);
}
